package com.permission.handler;


import com.permission.entity.SysOperationLogEntity;
import com.permission.mapper.SysOperationLogMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @desc: 记录系统操作日志
 * @projectName: permission-parent
 * @author: xhs
 * @date: 2021/12/30 14:00
 * @version: JDK 1.8
 */
@Slf4j
@Component
public class SystemLog {
    @Resource
    private SysOperationLogMapper operationLogMapper;

    /**
     * @param operationLog 系统模块
     */
    @Async("taskExecutor")
    public void systemLog(SysOperationLogEntity operationLog) {
        log.info(">>>>>>>>>>>>>>记录系统操作日志<<<<<<<<<<<<<<<<<<<<");
        operationLogMapper.insert(operationLog);
    }
}
